package com.cn.aam.checaiduo.widget;

import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;

/**
 * monker on 2017/7/11.
 */
public class MarqueTextView extends android.support.v7.widget.AppCompatTextView {
    public MarqueTextView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        init();
    }

    public MarqueTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    public MarqueTextView(Context context) {
        super(context);
        init();
    }

    private void init() {
        setEllipsize(TextUtils.TruncateAt.MARQUEE);
        setMarqueeRepeatLimit(Integer.MAX_VALUE);
    }

    @Override
    public boolean isFocused() {
        return true;
    }
}
